from rest_framework.permissions import IsAdminUser
from rest_framework.viewsets import ModelViewSet
from goods.models import Brand
from meiduo_admin.utils import PageNum
from meiduo_admin.serializers.brands import BrandSerializer

# 商品品牌
class BrandChannelView(ModelViewSet):
    # 指定序列化器
    serializer_class = BrandSerializer
    # 查询集
    queryset = Brand.objects.all()
    # 权限
    permission_classes = [IsAdminUser]
    # 分页器
    pagination_class = PageNum


